package day1027.dem2.two;



/**
 * @program: fanxing
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-10-27 16:26
 **/
public class test {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
        //通过类名获取
        Class<Pig>  dogClass = Pig.class;
        Pig pig = dogClass.newInstance();
        Pig pig1 = dogClass.newInstance();
        System.out.println(pig==pig1);
    }
}
class Pig{

}